package com.liujit.bms.admin.domain.params;

import com.liujit.common.domain.params.BaseParams;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Size;
import java.util.List;

/**
 * @Description 博客文章请求参数
 * @Author liujun
 * @Date 2021-07-03 14:54:49
 */
@Data
@ApiModel(value = "BlogArticleParams", description = "博客文章请求参数")
public class BlogArticleParams extends BaseParams {

    @ApiModelProperty(value = "分类id")
    private Long categoryId;

    @ApiModelProperty(value = "作者")
    @Length(max = 20, message = "作者最大长度20")
    private String author;

    @ApiModelProperty(value = "标题")
    @Length(max = 128, message = "标题最大长度128")
    private String title;

    @ApiModelProperty(value = "封面图片")
    private String coverImage;

    @ApiModelProperty(value = "内容")
    @Length(max = 65535, message = "内容最大长度65535")
    private String content;

    @ApiModelProperty(value = "内容-html")
    @Length(max = 65535, message = "内容-html最大长度65535")
    private String contentRender;

    @ApiModelProperty(value = "静态地址")
    @Length(max = 128, message = "静态地址最大长度128")
    private String staticPath;

    @ApiModelProperty(value = "是否公开：1、是。0、否。")
    private Short isOpen;

    @ApiModelProperty(value = "是否置顶：1、是。0、否。")
    private Short isTop;

    @ApiModelProperty(value = "标签ids")
    @Size(max = 3, message = "最多只能选择3个标签")
    private List<Long> labelIds;
}